package com.fawkes.smartworking.helper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @author xuetieqi
 * @date 2023/4/23 11:22 AM
 **/
public class BaseServiceImpl<
        M extends BaseMapper<T>,
        H extends BaseHelper<A, D, U, V, T>
        , A, D, U, G, Q, V, T>
        extends ServiceImpl<M, T> {

    @Autowired
    protected H baseHelper;

    public void insert(A dto) {
        baseHelper.checkAdd(dto);
    }


    public void delete(D dto) {
        baseHelper.checkDelete(dto);
    }


    public void update(U dto) {
        baseHelper.checkUpdate(dto);
    }


    public V get(G dto) {
        return null;
    }


    public IPage<V> page(Q dto) {
        return null;
    }


}
